#include "stdafx.h"
#include "FizzBuzz.h"

#include <sstream>

std::string FizzBuzz(int i)
  {
  if(i >= 1 && i <= 33)
    {

    if(i % 15 == 0)
      return "FizzBuzz";
    if(i % 5 == 0)
      return "Buzz";
    if(i % 3 == 0)
      return "Fizz";
    
    std::stringstream ss;
    ss << i;
    return ss.str();
    }
  else
    throw std::out_of_range("out of range [1;33]");
  }